﻿@model Models.ClientProfile

@{
    ViewBag.Title = "Create a new profile";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div>

    <!-- form start -->
    @using (Html.BeginForm("Create", "ClientProfile", FormMethod.Post, new { @class = "form-horizontal" }))
    {
        @Html.AntiForgeryToken()

        <div class="box-body">
            @if (!Html.ViewData.ModelState.IsValid)
            {
                <div class="callout callout-danger">
                    <h4>Error</h4>
                    <p>@Html.ValidationSummary(true, "")</p>
                </div>
            }

            <div class="form-group">
                @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control", placeholder = "John Smith" } })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.Name)</div>
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NRIC, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.EditorFor(model => model.NRIC, new { htmlAttributes = new { @class = "form-control", placeholder = "S2388829K" } })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.NRIC)</div>
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.GenderId, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.DropDownList("GenderId", null, htmlAttributes: new { @class = "form-control" })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.GenderId)</div>
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.RaceId, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.DropDownList("RaceId", null, htmlAttributes: new { @class = "form-control" })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.RaceId)</div>
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Age, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.EditorFor(model => model.Age, new { htmlAttributes = new { @class = "form-control", placeholder="30" } })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.Age)</div>
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.FamilyContactNo, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.EditorFor(model => model.FamilyContactNo, new { htmlAttributes = new { @class = "form-control", placeholder="Mary Smith/ Sister/ 82838384" } })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.FamilyContactNo)</div>
                </div>
            </div>

            <div class="form-group">
                @*@Html.LabelFor(model => model.AccufindTaggingInfoId, htmlAttributes: new { @class = "col-sm-2 control-label" })*@
                <label for="AccufindTaggingInfoIdentifier" class="col-sm-2 control-label">Accufind Tagging Info</label>
                <div class="col-sm-10">
                    @*@Html.DropDownList("AccufindTaggingInfoId", null, htmlAttributes: new { @class = "form-control" })*@
                    @*<div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.AccufindTaggingInfoId)</div>*@
                    <input name="AccufindTaggingInfoIdentifier" id="AccufindTaggingInfoIdentifier" value="" type="hidden" />
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.MedicalCondition, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.TextAreaFor(model => model.MedicalCondition, htmlAttributes: new { @class = "form-control", placeholder = "Details", rows = "3", columns = "" })
                    <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.MedicalCondition)</div>
                </div>
            </div>

        </div><!-- /.box-body -->
        <div class="box-footer">
            <a href="@Url.Action("Index")" class="btn btn-default">Back</a>

            <input type="submit" value="Create" class="btn btn-info pull-right" />
        </div><!-- /.box-footer -->
    }
    </div><!-- /.box -->

    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")

        <script>
            $(function () {
                prepareAccufindTaggingInfoView("@ViewBag.AllAccufindTaggingInfoTags", '@ViewBag.TagDelimiter', $('#AccufindTaggingInfoIdentifier'));
            });
        </script>
    }
